Repository navigation
feat: add the Bitbucket Cloud merge check app - #1
Merged
Merged
Conversation
A Forge app with two custom merge checks: Commit Check runs on every push to a pull request, Commit Check merge message runs on merge and checks the squash message. The commit-check CLI runs inside the Forge function in Pyodide, so the app calls nothing outside Atlassian.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Check on Bitbucket Cloud pull requests, as two custom merge checks from a Forge app that runs entirely on Atlassian. No server of ours, nothing called outside Atlassian.
What a Bitbucket user gets
body_ai_attribution = truecchk.tomlon the destination branch, so a pull request cannot loosen its own rules.[jira]andrequire_rebase_targetwork as on GitHub.require_verifiedshows as skipped, because Bitbucket gives apps no verdict. Squash mode checks at merge.How
The unchanged commit-check CLI wheel (2.24.0, pinned by sha256 in
package.json) runs in Pyodide. A small shim answers the CLI's git questions from the commits Bitbucket's API returned. Parity tests build a real git repository and compare the real CLI's JSON with the Pyodide run case by case, so a CLI release that asks git something new fails here first.Measured on the built package: about 2 s on a cold start, a few ms per commit after that. The check answers within 20 s of Forge's 25 s; a check that cannot finish or cannot run fails and says to re-run it.
The report wording (
src/report.js) and the Jira check (src/jira.js) are copied from the GitHub App, so both say the same thing.Names to confirm before the first deploy
These are public, and a renamed module key drops the check from every repository's settings:
commit-check,commit-check-merge-messageforge register: Commit CheckNot tried yet
The Forge runtime itself, which needs your Atlassian login. The package uses Forge's manual packaging (
bundler: manual@2026, a preview feature) so Pyodide's WebAssembly ships as files;manifest.ymlpasses@forge/manifestvalidation.Your steps after merge
From the README:
forge login,forge register "Commit Check"(commit the app id it writes),npm run build,forge deploy,forge installin a test workspace, turn on the checks in Bitbucket, open a pull request.Tests
162 tests pass (including the parity tests against the real CLI 2.24.0), coverage 100%, lint clean,
npm run buildsucceeds.